home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / turbo_t2.arc / TIME.INC < prev    next >
Text File  |  1985-06-15  |  654b  |  23 lines

  1. FUNCTION Time:Real;
  2. {
  3.    Get time from system clock,  convert Hours, Minutes, Seconds,
  4.    and Hundredths of Seconds to time in Seconds.    This makes it
  5.    easy to measure elapsed time by subtracting one time from a
  6.    later time.
  7. }
  8.  
  9. TYPE Register_Type = Record
  10.                        AX, BX, CX, DX : Integer
  11.                      End;
  12. VAR
  13.   Reg : Register_Type;
  14.  
  15. BEGIN
  16.   Reg.AX := $2C00;
  17.   Intr($21,Reg);
  18.   Time := (Reg.CX shr 8)       * 3600    {Hours      }
  19.         + (Reg.CX and $00FF)   * 60      {Minutes    }
  20.         + (Reg.DX shr 8)     { * 1 }     {Seconds    }
  21.         + (Reg.DX and $00FF)   / 100 ;   {Hundredths }
  22. END;
  23.